var global_count = 1;

window.addEvent('domready', function(){

var scroll = new Fx.Scroll('firstvis', {
	wait: false,
	duration: 700,
	transition: Fx.Transitions.Sine.easeOut
});

$('tablink1').addEvent('click', function(event) {
	event = new Event(event).stop();
	scroll.toElement('tabin1');
	global_count=1;
});

$('tablink2').addEvent('click', function(event) {
	event = new Event(event).stop();
	scroll.toElement('tabin2');
    global_count=2;
});

$('tablink3').addEvent('click', function(event) {
	event = new Event(event).stop();
	scroll.toElement('tabin3');
    global_count=3;
});

$('tablink4').addEvent('click', function(event) {
	event = new Event(event).stop();
	scroll.toElement('tabin4');
    global_count=4;
});

$('tablink5').addEvent('click', function(event) {
	event = new Event(event).stop();
	scroll.toElement('tabin5');
    global_count=5;
});

//$('prev').addEvent('click', function(event) {
//    global_count--;
//    if (global_count<1)
//	{
//      global_count=1;
//    }
//    event = new Event(event).stop();
//    scroll.toElement('tabin'+global_count);
//});
//
//$('next').addEvent('click', function(event) {
//    global_count++;
//    if (global_count>5)
//    {
//      global_count=5;
//	}
//	event = new Event(event).stop();
//	scroll.toElement('tabin'+global_count);
//});


});
